[#ftl]
[#import "common/macrolibs.ftl" as lib]
[#import "common/commonclass.ftl" as cls]
package ${lib.packageBase}.mappers;

[#if (clazz.mtmRelations?size>0)]
import java.util.List;
[/#if]

[#if (clazz.mtmRelations?size>0)]
import com.smzd.core.domain.Many2Many;
import com.smzd.core.utils.db.RPage;
[/#if]
import com.smzd.core.mappers.IMapper;
import ${cls.myFullClassName};

public interface ${cls.mySimpleClassName}Mapper extends IMapper<${cls.mySimpleClassName}> {
    [#if (clazz.mtmRelations?size>0)]
    [#list clazz.mtmRelations as mtm]
    [#assign masterClassName][@lib.simpleClassName clazz=mtm.master/][/#assign]
    [#assign slaveClassName][@lib.simpleClassName clazz=mtm.slave/][/#assign]
    [#assign configView][@lib.moduleName clazz=mtm.master/][@lib.moduleNames clazz=mtm.slave/].ftl[/#assign]
    [#assign masterId]${masterClassName?uncap_first}Id[/#assign]
    [#assign slaveId]${cls.mySimpleClassName?uncap_first}Id[/#assign]
    List<${cls.mySimpleClassName}> getOuter${slaveClassName}ListBy${masterClassName}(RPage<${cls.mySimpleClassName}> page);
    
    void insert${masterClassName}${slaveClassName}Relation(Many2Many add);
    
    void remove${masterClassName}${slaveClassName}Relation(Many2Many del);
    [/#list]
    [/#if]
}